#! /bin/bash

if [ ${#1} -eq 0 ]; then echo "command failed, please pass the project release url."; exit 1; fi

PRJ_URL=$1

LATEST_VERSION=`curl -s $PRJ_URL | grep "<span class=\"css-truncate-target"| sed -e "s/<[^>]*>//g" | awk 'NR==1 {print $1}' | sed 's/^.\{1\}//'`

echo $LATEST_VERSION
